package com.godpaper.mqtt.as3.core
{
	import flash.external.ExternalInterface;

	public class Log
	{
		static private var _debug:Boolean = false;
		
		public static function setDebug(de:Boolean):void
		{
			Log._debug = de;
		}
		
		public static function log(...message):void
		{
			ExternalInterface.call("console.log","log : " + message);
		}
		
		public static function info(...message):void
		{
			ExternalInterface.call("console.log","log : " + message);
		}
		
		public static function error(...message):void
		{
			ExternalInterface.call("console.log","error : " + message);
			
		}
		
		public static function debug(...message):void
		{
			if (Log._debug) {
				ExternalInterface.call("console.log","debug : " + message);
			}
		}
	}
}